#ifndef BOT_H_INCLUDED
#define BOT_H_INCLUDED

#include "botcode.h"
#include "defines.h"
using namespace std;

class superBot;

// a normal bot
class bot {
  public:
    // functions
    bot(wxInt32 stic, superBot *mySbot, int nhealth);
    // variables
    botcode   code;
    int       direction;      // 0 = north, 1 = west, 2 = south, 3 = west
    wxInt32   health;         // health, decreases every tick
    wxInt32   lineNr;         // the linenumber of the code to execute
    int       memory[BOT_NUMMEMCELLS];       // the bots memory
    superBot* mySuperbot;     // pointer to the bot's superbot
    wxInt32   startTic;       // ticnumber when it was created
};

// all bots have a superbot as their ancestor, a superbot contains some
// basic info that is the same for all bots with the same superbot
class superBot {
  public:
    // functions
    superBot(wxInt32 sbotid, long tic);
    void ReadNameFromFile();
    // variables
    wxString    codeFile;     // the file containing the code
    double      hue;          // the hue of the image (-1 to +1)
    wxString    name;         // the name of the superbot
    vector<int> numbers;      // history in numbers (pop size)
    wxInt32     startTic;     // tic when the superbot was added
    wxInt32     superBotId;   // the unique ID for the superbot
};

#endif // BOT_H_INCLUDED
